#pragma once
#include<iostream>
#include<cassert>
#include<cstdlib>
using std::endl;
using std::cin;
using std::cout;
struct queuenode
{
	int val;
	struct queuenode* next;
};
class queue
{
public:
	void init()
	{
		head = tail = nullptr;
	}
	void push(int x);
	void pop();
	void print()
	{
		queuenode* cur = head;
		while (cur)
		{
			cout << cur->val << "->";
			cur = cur->next;
		}
	}
private:
	queuenode* head;
	queuenode* tail;
};

